/********************************************************************

Define config exceptions.

Write Date: 2011/07/29
Author: Deng Nianchen
>>>> The file contains following classes:
>>>> ConfigManagerException
>>>> --> ReadConfigFileException
>>>> --> WriteConfigFileException

*********************************************************************/
#ifndef CONFIG_EXCEPTIONS_HPP
#define CONFIG_EXCEPTIONS_HPP
#include "OOPException.hpp"

_OOPUTILS_BEGIN

/**************************************************************************************************
 * <summary>  Exception for signalling general config errors.  </summary>
 *
 * <remarks>  Deng Nianchen, 2011/07/29. </remarks>
 **************************************************************************************************/

class ConfigManagerException : public OOPException
{
public:

	virtual OOPString getReson () const throw ()
	{
		return L"Unknown exception in configuation manager";
	}

};

/**************************************************************************************************
 * <summary>  Exception for signalling read config file exception.  </summary>
 *
 * <remarks>  Deng Nianchen, 2011/07/29. </remarks>
 **************************************************************************************************/

class ReadConfigFileException : public ConfigManagerException
{

	virtual OOPString getReson () const throw ()
	{
		return L"Fail to load the configuration file";
	}

};

/**************************************************************************************************
 * <summary>  Exception for signalling write config file exception.  </summary>
 *
 * <remarks>  Deng Nianchen, 2011/07/29. </remarks>
 **************************************************************************************************/

class WriteConfigFileException : public ConfigManagerException
{

	virtual OOPString getReson () const throw ()
	{
		return L"Fail to save the configuration file";
	}

};

_OOPUTILS_END

#endif